function createDialog(type, context) 
{
	if (type == "node")
	{
		var newDialog = $('\
			<div id="' + context.id + '" title="' + context.type + context.id + '">\
				<table class="ui-widget ui-widget-content">\
					<tr>\
						<th class="ui-widget-header">Bandwidth</th>\
						<td id="band">' + context.title + '</td>\
					</tr>\
					<tr>\
						<th class="ui-widget-header">Delay</th>\
						<td id="delay">' + context.title + '</td>\
					</tr>\
					<tr>\
						<th class="ui-widget-header">Jitter</th>\
						<td id="jitter">' + context.title + '</td>\
					</tr>\
					<tr>\
						<th class="ui-widget-header">Resolution</th>\
						<td id="res">' + context.title + '</td>\
					</tr>\
				</table>\
				<br />\
				<div id="' + context.graph + '" style="width:200px;height:100px;"></div>\
			</div>\
		');
		
		newDialog.dialog({
			position: [context.pos.x, context.pos.y],
			width: context.pos.width,
			height: context.pos.height,
			close: function() { alert('close'); },
			resizable: false,
			draggable: false
		});
	}
	else if (type == "content")
	{
		var newDialog = $('\
			<div id="' + context.id + '" title="' + context.title + '">\
				<table class="ui-widget ui-widget-content">\
					<tr>\
						<th class="ui-widget-header">Bitrate</th>\
						<td id="bitrate">' + context.bitrate + '</td>\
					</tr>\
					<tr>\
						<th class="ui-widget-header">FPS</th>\
						<td id="fps">' + context.fps + '</td>\
					</tr>\
					<tr>\
						<th class="ui-widget-header">Resolution</th>\
						<td id="res">' + context.resolution + '</td>\
					</tr>\
				</table>\
			</div>\
		');
		
		newDialog.dialog({
			position: [context.pos.x, context.pos.y],
			width: context.pos.width,
			height: context.pos.height,
			close: function() { alert('close'); },
			resizable: false,
			draggable: false
		});
	}
}